var summary = new Vue({
	el: '#summary',
	data: {
		display: false,
		speeds: [{
			id: 4431,
			road: '永兴路',
			speed: 22.1,
			time: '11:30:23'
		},{
			id: 4432,road: '永兴路',
			speed: 19.2,
			time: '11:27:03'
		},{
			id: 4433,road: '留和路',
			speed: 16,
			time: '11:25:43'
		},{
			id: 4434,road: '文三路',
			speed: 2,
			time: '11:24:23'
		},{
			id: 4435,road: '文三路',
			speed: 13.6,
			time: '11:22:02'
		},{
			id: 4436,road: '文三路',
			speed: 17.5,
			time: '11:22:01'
		},{
			id: 4437,road: '古荡路',
			speed: 15.5,
			time: '11:18:23'
		},{
			id: 3428,road: '古荡路',
			speed: 0.0,
			time: '11:15:22'
		},{
			id: 3429,road: '高教路',
			speed: 22,
			time: '11:14:43'
		},{
			id: 3430,road: '高教路',
			speed: 16.9,
			time: '11:11:33'
		},{
			id: 3431,road: '高教路',
			speed: 22.1,
			time: '13:07:05'
		},{
			id: 3432,road: '五常路',
			speed: 20.2,
			time: '11:03:23'
		}]
	}
});

$(function () {                                                                
    $('#f').highcharts({                                           
        chart: {                                                           
            type: 'bar'                                                    
        },                                                                 
        title: {                                                           
            text: ''                    
        },                                                                 
        subtitle: {                                                        
            text: ''                                  
        },                                                                 
        xAxis: {                                                           
            categories: ['前15分钟', '前30分钟', '前45分钟'],
            title: {                                                       
                text: null                                                 
            }                                                              
        },                                                                 
        yAxis: {                                                           
            min: 0,                                                        
            title: {                                                       
                text: '道路数',                             
                align: 'high'                                              
            },                                                             
            labels: {                                                      
                overflow: 'justify'                                        
            }                                                              
        },                                                                 
        tooltip: {                                                         
            valueSuffix: ' 条'                                       
        },                                                                 
        plotOptions: {                                                     
            bar: {                                                         
                dataLabels: {                                              
                    enabled: true                                          
                }                                                          
            }                                                              
        },                                                                 
        legend: {                                                          
            layout: 'vertical',                                            
            align: 'right',                                                
            verticalAlign: 'top',                                          
            x: -40,                                                        
            y: 100,                                                        
            floating: true,                                                
            borderWidth: 1,                                                
            backgroundColor: '#FFFFFF',                                    
            shadow: true                                                   
        },                                                                 
        credits: {                                                         
            enabled: false                                                 
        },       
       	colors: ['#FF3300', '#FF9900', '#66CC00', '#669900'],                                                          
        series: [{                                                         
            name: '无法通行',                                             
            data: [43,60, 98]                                   
        }, {                                                               
            name: '拥堵',                                             
            data: [345, 384, 435]                                  
        }, {                                                               
            name: '正常',                                             
            data: [2315, 2013, 1982]                                  
        }, {                                                               
            name: '通畅',                                             
            data: [509, 755, 697]                                
        }]                                                                 
    });                                                                    
});  

module.exports = summary;